package com.joney.website.entity.enums;

import com.baomidou.mybatisplus.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

import java.io.Serializable;

/**
 * 状态(0:锁定 1:启用)
 */
public enum UserStateEnum implements IEnum {

    DISABLE(0, "锁定"),

    ENABLE(1, "启用");

    private int code;
    private String desc;

    UserStateEnum(final int code, final String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public Serializable getValue() {
        return this.code;
    }

    public int code() {
        return this.code;
    }

    @JsonValue
    public String desc(){
        return this.desc;
    }
}
